incrementing the pause_count field. The latter ensures that the VCPU
gets descheduled --- synchronously in the case of the
currently-running VCPU.
Based on a bug report and proposed patch by Ben Guthro and Robert
Phillips of Virtual Iron.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
return;
d->is_shut_down = 1;
-
- for_each_vcpu ( d, v )
- vcpu_sleep_nosync(v);
-
send_guest_global_virq(dom0, VIRQ_DOM_EXC);
}
if ( d->is_shutting_down )
{
if ( !v->paused_for_shutdown )
- atomic_inc(&v->pause_count);
+ vcpu_pause_nosync(v);
v->paused_for_shutdown = 1;
v->defer_shutdown = 0;
__domain_finalise_shutdown(d);
{
if ( v->defer_shutdown )
continue;
- atomic_inc(&v->pause_count);
+ vcpu_pause_nosync(v);
v->paused_for_shutdown = 1;
}